﻿@{
    Layout = null;
}
@using PermissionManager.Model;
@{
    var modules = ViewBag.modules as List<Module>;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="~/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="~/css/style.css" />
    <link href="~/assets/css/codemirror.css" rel="stylesheet" />
    <link rel="stylesheet" href="~/assets/css/ace.min.css" />
    <link rel="stylesheet" href="~/font/css/font-awesome.min.css" />
    <link href="~/layui/css/layui.css" rel="stylesheet" />
    <link href="~/css/LayuiCheckbox.css" rel="stylesheet" />
    <!--[if lte IE 8]>
      <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
    <![endif]-->
    <script src="~/js/jquery-1.9.1.min.js"></script>
    <script src="~/assets/js/bootstrap.min.js"></script>
    <script src="~/assets/js/typeahead-bs2.min.js"></script>
    <script src="~/assets/js/jquery.dataTables.min.js"></script>
    <script src="~/assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="~/assets/layer/layer.js" type="text/javascript"></script>
    <script src="~/assets/laydate/laydate.js" type="text/javascript"></script>
    <script src="~/layui/layui.js"></script>
    <script src="~/Scripts/TimeFormat.js"></script>
    <title>管理权限</title>
</head>

<body>
    <div class="margin clearfix">
        <div class="border clearfix">
            <span class="l_f">
                <a href="Competence" id="Competence_add" class="btn btn-warning" title="添加权限"><i class="fa fa-plus"></i>添加权限</a>                
            </span>
        </div>
        <div class="compete_list">
            <script type="text/html" id="switchTpl">
                <input type="checkbox" name="status" value="{{d.Id}}" lay-skin="switch" lay-text="开启|停用" lay-filter="statusDemo" {{ d.IsEnable == true ? 'checked' : '' }}/>
            </script>
            <table id="sample-table-1" lay-filter="test"></table>
            <script type="text/html" id="barDemo">
                <span class="td-manage">
                    <a lay-event="edit" title="编辑" href="javascript:;" class="btn btn-xs btn-info"><i class="fa fa-edit bigger-120"></i></a>
                    <a lay-event="del" title="删除" href="javascript:;" class="btn btn-xs btn-warning"><i class="fa fa-trash  bigger-120"></i></a>
                </span>
            </script>
        </div>
    </div>
    <div class="left_Competence_add" id="change" style="height: 250px; display:none;padding-top:10px">
        <div class="Competence_add">
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="form-field-1">权限名称</label>
                <div class="col-sm-9"><input type="text" id="roleName" placeholder="" name="权限名称" class="col-xs-10 col-sm-5" style="margin-left:0px" /></div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="form-field-1">所属组</label>
                <div class="col-sm-9">
                    <select id="RoleModule">
                        @foreach (var item in modules)
                        {
                            <option value=@item.Id>@item.Name</option>
                        }
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 权限描述 </label>
                <div class="col-sm-9"><textarea name="权限描述" class="form-control" id="roleDe" placeholder="" onkeyup="checkLength(this);"></textarea><span class="wordage">剩余字数：<span id="sy" style="color:Red;">200</span>字</span></div>
            </div>
            <!--按钮操作-->
            <div class="Button_operation">
                <button class="btn btn-primary radius" id="article_change_submit" type="submit"><i class="fa fa-save "></i> 保存并提交</button>
                <button onclick="article_save();" class="btn btn-secondary  btn-warning" type="button"><i class="fa fa-reply"></i> 返回上一步</button>
                <button onclick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>         
        </div>
    </div>
</body>
</html>
<script src="~/Scripts/Home/RoleCompetence.js"></script>